```html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Linux容器核心技术：cgroups与namespaces详解</title>
    <link href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <link href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            color: #333;
            line-height: 1.6;
        }
        .hero {
            background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
        }
        .title {
            font-family: 'Noto Serif SC', serif;
        }
        .card {
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }
        .card:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        }
        .code-block {
            font-family: 'Courier New', Courier, monospace;
            background-color: #f8f9fa;
            border-radius: 0.375rem;
            overflow-x: auto;
        }
        .feature-icon {
            color: #4f46e5;
        }
        .hover\:scale-105:hover {
            transform: scale(1.05);
        }
        .footer-link:hover {
            color: #a5b4fc;
        }
        .diagram-container {
            background-color: #f8f9fa;
            border-radius: 0.5rem;
            padding: 1.5rem;
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Hero Section -->
    <section class="hero text-white py-20 px-4 sm:px-6 lg:px-8">
        <div class="max-w-4xl mx-auto text-center">
            <div class="flex justify-center mb-6">
                <span class="inline-flex items-center px-3 py-1 rounded-full text-sm font-medium bg-white bg-opacity-20 backdrop-blur-sm">
                    <i class="fas fa-linux mr-2"></i> Linux核心技术
                </span>
            </div>
            <h1 class="title text-4xl sm:text-5xl md:text-6xl font-bold mb-6 leading-tight">
                Linux容器资源隔离
            </h1>
            <p class="text-xl sm:text-2xl max-w-3xl mx-auto opacity-90 mb-10">
                深入解析cgroups与namespaces如何实现容器化的资源管理与环境隔离
            </p>
            <div class="flex flex-col sm:flex-row justify-center gap-4">
                <a href="#cgroups" class="px-6 py-3 bg-white text-indigo-600 font-medium rounded-lg hover:bg-opacity-90 transition-all hover:scale-105">
                    <i class="fas fa-chart-pie mr-2"></i> cgroups详解
                </a>
                <a href="#namespaces" class="px-6 py-3 bg-indigo-700 text-white font-medium rounded-lg hover:bg-indigo-800 transition-all hover:scale-105">
                    <i class="fas fa-project-diagram mr-2"></i> namespaces详解
                </a>
            </div>
        </div>
    </section>

    <!-- Main Content -->
    <div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
        <!-- Introduction -->
        <section class="mb-16">
            <div class="prose prose-indigo max-w-none">
                <p class="text-lg text-gray-700 leading-relaxed">
                    在Linux系统中，<strong>cgroups</strong>（控制组）和<strong>namespaces</strong>是容器化应用资源隔离的核心技术。它们提供了资源管理和环境隔离的基础，使得多个容器可以在同一台物理主机上并行运行而不会互相干扰。
                </p>
            </div>
        </section>

        <!-- Visualization Section -->
        <section class="mb-20">
            <h2 class="title text-3xl font-bold mb-8 text-center text-gray-800">技术架构关系图</h2>
            <div class="diagram-container">
                <div class="mermaid">
                    graph TD
                    A[Linux容器技术] --> B[cgroups]
                    A --> C[namespaces]
                    B --> D[资源限制]
                    B --> E[资源优先级]
                    B --> F[资源监控]
                    C --> G[进程隔离]
                    C --> H[网络隔离]
                    C --> I[文件系统隔离]
                    D --> J[CPU,内存,I/O等]
                    E --> K[优先级分配]
                    F --> L[使用情况统计]
                    G --> M[独立进程树]
                    H --> N[独立网络栈]
                    I --> O[独立挂载点]
                </div>
            </div>
        </section>

        <!-- cgroups Section -->
        <section id="cgroups" class="mb-20">
            <div class="flex items-center mb-8">
                <div class="flex-shrink-0 mr-4">
                    <div class="flex items-center justify-center h-12 w-12 rounded-md bg-indigo-100 text-indigo-600">
                        <i class="fas fa-chart-pie text-xl feature-icon"></i>
                    </div>
                </div>
                <h2 class="title text-3xl font-bold text-gray-800">cgroups (Control Groups)</h2>
            </div>
            
            <div class="prose prose-indigo max-w-none mb-10">
                <p><code class="text-sm bg-gray-100 px-2 py-1 rounded">cgroups</code> 是 Linux 内核提供的一种机制，用于限制、记录和隔离进程组的资源使用情况。它允许系统管理员对系统资源进行精细控制。</p>
            </div>
            
            <div class="grid md:grid-cols-2 gap-8 mb-10">
                <!-- Features Card -->
                <div class="card bg-white p-6 rounded-xl shadow-md">
                    <h3 class="title text-xl font-semibold mb-4 text-indigo-700 flex items-center">
                        <i class="fas fa-list-check mr-2 feature-icon"></i> 主要功能
                    </h3>
                    <ul class="space-y-3">
                        <li class="flex items-start">
                            <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                            <span><strong>资源限制</strong>：限制进程组的 CPU、内存、磁盘 I/O 和网络带宽等资源使用</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                            <span><strong>资源优先级</strong>：设置资源优先级，确保高优先级进程组获得更多资源</span>
                        </li>
                        <li class="flex items-start">
                            <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                            <span><strong>监控</strong>：记录和监控资源使用情况，便于分析和优化</span>
                        </li>
                    </ul>
                </div>
                
                <!-- Subsystems Card -->
                <div class="card bg-white p-6 rounded-xl shadow-md">
                    <h3 class="title text-xl font-semibold mb-4 text-indigo-700 flex items-center">
                        <i class="fas fa-cubes mr-2 feature-icon"></i> 常用子系统
                    </h3>
                    <div class="grid grid-cols-2 gap-2">
                        <div class="bg-indigo-50 px-3 py-2 rounded text-sm font-medium text-indigo-700 flex items-center">
                            <i class="fas fa-microchip mr-2"></i> cpu
                        </div>
                        <div class="bg-indigo-50 px-3 py-2 rounded text-sm font-medium text-indigo-700 flex items-center">
                            <i class="fas fa-memory mr-2"></i> memory
                        </div>
                        <div class="bg-indigo-50 px-3 py-2 rounded text-sm font-medium text-indigo-700 flex items-center">
                            <i class="fas fa-hdd mr-2"></i> blkio
                        </div>
                        <div class="bg-indigo-50 px-3 py-2 rounded text-sm font-medium text-indigo-700 flex items-center">
                            <i class="fas fa-network-wired mr-2"></i> net_cls
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- Code Examples -->
            <h3 class="title text-2xl font-semibold mb-6 text-gray-800 flex items-center">
                <i class="fas fa-terminal mr-3 text-indigo-600"></i> 使用示例
            </h3>
            
            <div class="grid md:grid-cols-2 gap-8">
                <!-- Example 1 -->
                <div class="card bg-white p-6 rounded-xl shadow-md">
                    <div class="flex items-center mb-4">
                        <div class="flex-shrink-0 mr-3">
                            <div class="flex items-center justify-center h-8 w-8 rounded-full bg-indigo-100 text-indigo-600">
                                <i class="fas fa-folder-plus"></i>
                            </div>
                        </div>
                        <h4 class="title font-medium text-gray-800">创建 cgroup</h4>
                    </div>
                    <div class="code-block px-4 py-3">
                        <code class="text-sm">mkdir /sys/fs/cgroup/cpu/my_cgroup</code>
                    </div>
                </div>
                
                <!-- Example 2 -->
                <div class="card bg-white p-6 rounded-xl shadow-md">
                    <div class="flex items-center mb-4">
                        <div class="flex-shrink-0 mr-3">
                            <div class="flex items-center justify-center h-8 w-8 rounded-full bg-indigo-100 text-indigo-600">
                                <i class="fas fa-tachometer-alt"></i>
                            </div>
                        </div>
                        <h4 class="title font-medium text-gray-800">限制 CPU 使用</h4>
                    </div>
                    <div class="code-block px-4 py-3">
                        <code class="text-sm">echo 50000 > /sys/fs/cgroup/cpu/my_cgroup/cpu.cfs_quota_us</code>
                    </div>
                </div>
                
                <!-- Example 3 -->
                <div class="card bg-white p-6 rounded-xl shadow-md">
                    <div class="flex items-center mb-4">
                        <div class="flex-shrink-0 mr-3">
                            <div class="flex items-center justify-center h-8 w-8 rounded-full bg-indigo-100 text-indigo-600">
                                <i class="fas fa-plus-circle"></i>
                            </div>
                        </div>
                        <h4 class="title font-medium text-gray-800">将进程添加到 cgroup</h4>
                    </div>
                    <div class="code-block px-4 py-3">
                        <code class="text-sm">echo &lt;pid&gt; > /sys/fs/cgroup/cpu/my_cgroup/cgroup.procs</code>
                    </div>
                </div>
            </div>
        </section>

        <!-- namespaces Section -->
        <section id="namespaces" class="mb-20">
            <div class="flex items-center mb-8">
                <div class="flex-shrink-0 mr-4">
                    <div class="flex items-center justify-center h-12 w-12 rounded-md bg-indigo-100 text-indigo-600">
                        <i class="fas fa-project-diagram text-xl feature-icon"></i>
                    </div>
                </div>
                <h2 class="title text-3xl font-bold text-gray-800">namespaces</h2>
            </div>
            
            <div class="prose prose-indigo max-w-none mb-10">
                <p><code class="text-sm bg-gray-100 px-2 py-1 rounded">namespaces</code> 提供了进程和系统资源的隔离。每个 namespace 都可以拥有自己独立的系统视图，包括进程、网络、文件系统等。</p>
            </div>
            
            <!-- Namespace Types -->
            <h3 class="title text-2xl font-semibold mb-6 text-gray-800 flex items-center">
                <i class="fas fa-layer-group mr-3 text-indigo-600"></i> 主要类型
            </h3>
            
            <div class="grid md:grid-cols-2 lg:grid-cols-3 gap-6 mb-10">
                <!-- PID -->
                <div class="card bg-white p-6 rounded-xl shadow-md">
                    <div class="flex items-center mb-3">
                        <div class="flex-shrink-0 mr-3">
                            <div class="flex items-center justify-center h-8 w-8 rounded-full bg-indigo-100 text-indigo-600">
                                <i class="fas fa-fingerprint"></i>
                            </div>
                        </div>
                        <h4 class="title font-medium text-gray-800">PID namespace</h4>
                    </div>
                    <p class="text-gray-600 text-sm">隔离进程 ID，使得每个 namespace 内的进程可以有自己独立的进程 ID</p>
                </div>
                
                <!-- NET -->
                <div class="card bg-white p-6 rounded-xl shadow-md">
                    <div class="flex items-center mb-3">
                        <div class="flex-shrink-0 mr-3">
                            <div class="flex items-center justify-center h-8 w-8 rounded-full bg-indigo-100 text-indigo-600">
                                <i class="fas fa-network-wired"></i>
                            </div>
                        </div>
                        <h4 class="title font-medium text-gray-800">NET namespace</h4>
                    </div>
                    <p class="text-gray-600 text-sm">隔离网络资源，每个 namespace 可以有自己的网络接口、IP 地址和路由</p>
                </div>
                
                <!-- MNT -->
                <div class="card bg-white p-6 rounded-xl shadow-md">
                    <div class="flex items-center mb-3">
                        <div class="flex-shrink-0 mr-3">
                            <div class="flex items-center justify-center h-8 w-8 rounded-full bg-indigo-100 text-indigo-600">
                                <i class="fas fa-folder-tree"></i>
                            </div>
                        </div>
                        <h4 class="title font-medium text-gray-800">MNT namespace</h4>
                    </div>
                    <p class="text-gray-600 text-sm">隔离文件系统挂载，使得不同的 namespace 可以拥有不同的挂载点</p>
                </div>
                
                <!-- UTS -->
                <div class="card bg-white p-6 rounded-xl shadow-md">
                    <div class="flex items-center mb-3">
                        <div class="flex-shrink-0 mr-3">
                            <div class="flex items-center justify-center h-8 w-8 rounded-full bg-indigo-100 text-indigo-600">
                                <i class="fas fa-desktop"></i>
                            </div>
                        </div>
                        <h4 class="title font-medium text-gray-800">UTS namespace</h4>
                    </div>
                    <p class="text-gray-600 text-sm">隔离主机名和域名，使得不同的 namespace 可以有不同的主机名</p>
                </div>
                
                <!-- IPC -->
                <div class="card bg-white p-6 rounded-xl shadow-md">
                    <div class="flex items-center mb-3">
                        <div class="flex-shrink-0 mr-3">
                            <div class="flex items-center justify-center h-8 w-8 rounded-full bg-indigo-100 text-indigo-600">
                                <i class="fas fa-comments"></i>
                            </div>
                        </div>
                        <h4 class="title font-medium text-gray-800">IPC namespace</h4>
                    </div>
                    <p class="text-gray-600 text-sm">隔离进程间通信（IPC）资源，如消息队列、信号量和共享内存</p>
                </div>
                
                <!-- USER -->
                <div class="card bg-white p-6 rounded-xl shadow-md">
                    <div class="flex items-center mb-3">
                        <div class="flex-shrink-0 mr-3">
                            <div class="flex items-center justify-center h-8 w-8 rounded-full bg-indigo-100 text-indigo-600">
                                <i class="fas fa-user-shield"></i>
                            </div>
                        </div>
                        <h4 class="title font-medium text-gray-800">USER namespace</h4>
                    </div>
                    <p class="text-gray-600 text-sm">隔离用户和组 ID，使得不同的 namespace 可以有不同的用户权限映射</p>
                </div>
            </div>
            
            <!-- Code Examples -->
            <h3 class="title text-2xl font-semibold mb-6 text-gray-800 flex items-center">
                <i class="fas fa-terminal mr-3 text-indigo-600"></i> 使用示例
            </h3>
            
            <div class="grid md:grid-cols-2 gap-8">
                <!-- Example 1 -->
                <div class="card bg-white p-6 rounded-xl shadow-md">
                    <div class="flex items-center mb-4">
                        <div class="flex-shrink-0 mr-3">
                            <div class="flex items-center justify-center h-8 w-8 rounded-full bg-indigo-100 text-indigo-600">
                                <i class="fas fa-network-wired"></i>
                            </div>
                        </div>
                        <h4 class="title font-medium text-gray-800">创建新的网络 namespace</h4>
                    </div>
                    <div class="code-block px-4 py-3">
                        <code class="text-sm">ip netns add my_netns</code>
                    </div>
                </div>
                
                <!-- Example 2 -->
                <div class="card bg-white p-6 rounded-xl shadow-md">
                    <div class="flex items-center mb-4">
                        <div class="flex-shrink-0 mr-3">
                            <div class="flex items-center justify-center h-8 w-8 rounded-full bg-indigo-100 text-indigo-600">
                                <i class="fas fa-exchange-alt"></i>
                            </div>
                        </div>
                        <h4 class="title font-medium text-gray-800">将进程移动到新的 PID namespace</h4>
                    </div>
                    <div class="code-block px-4 py-3">
                        <code class="text-sm">unshare --pid --fork --mount-proc bash</code>
                    </div>
                </div>
                
                <!-- Example 3 -->
                <div class="card bg-white p-6 rounded-xl shadow-md">
                    <div class="flex items-center mb-4">
                        <div class="flex-shrink-0 mr-3">
                            <div class="flex items-center justify-center h-8 w-8 rounded-full bg-indigo-100 text-indigo-600">
                                <i class="fas fa-box-open"></i>
                            </div>
                        </div>
                        <h4 class="title font-medium text-gray-800">启动容器进程使用新的 namespace</h4>
                    </div>
                    <div class="code-block px-4 py-3">
                        <code class="text-sm">unshare --net --mount-proc --pid --fork /bin/bash</code>
                    </div>
                </div>
            </div>
        </section>

        <!-- Combined Usage Section -->
        <section class="mb-20">
            <div class="bg-indigo-50 rounded-2xl p-8 md:p-12">
                <div class="max-w-4xl mx-auto">
                    <h2 class="title text-3xl font-bold mb-6 text-gray-800 text-center">结合使用 cgroups 和 namespaces</h2>
                    <div class="prose prose-indigo max-w-none mb-8">
                        <p>在容器化环境中，<code class="bg-indigo-100 px-2 py-1 rounded">cgroups</code> 和 <code class="bg-indigo-100 px-2 py-1 rounded">namespaces</code> 通常被结合使用，以实现全面的资源隔离和控制。容器引擎（如 Docker 和 Kubernetes）使用这些技术来提供容器的资源管理和环境隔离功能。</p>
                    </div>
                    
                    <h3 class="title text-2xl font-semibold mb-6 text-gray-800 flex items-center justify-center">
                        <i class="fas fa-random mr-3 text-indigo-600"></i> 容器化的工作流程
                    </h3>
                    
                    <div class="grid md:grid-cols-3 gap-6 mb-10">
                        <!-- Step 1 -->
                        <div class="card bg-white p-6 rounded-xl shadow-md text-center">
                            <div class="flex justify-center mb-4">
                                <div class="flex items-center justify-center h-12 w-12 rounded-full bg-indigo-100 text-indigo-600">
                                    <i class="fas fa-1 text-xl"></i>
                                </div>
                            </div>
                            <h4 class="title font-medium text-gray-800 mb-2">初始化 namespaces</h4>
                            <p class="text-gray-600 text-sm">为容器创建独立的 PID、NET、MNT、IPC 和 UTS namespaces，以确保容器内的进程与宿主机及其他容器隔离</p>
                        </div>
                        
                        <!-- Step 2 -->
                        <div class="card bg-white p-6 rounded-xl shadow-md text-center">
                            <div class="flex justify-center mb-4">
                                <div class="flex items-center justify-center h-12 w-12 rounded-full bg-indigo-100 text-indigo-600">
                                    <i class="fas fa-2 text-xl"></i>
                                </div>
                            </div>
                            <h4 class="title font-medium text-gray-800 mb-2">应用 cgroups</h4>
                            <p class="text-gray-600 text-sm">对容器的资源使用进行限制和监控。创建 cgroup 以限制 CPU、内存和 I/O 等资源，并将容器进程加入相应的 cgroup</p>
                        </div>
                        
                        <!-- Step 3 -->
                        <div class="card bg-white p-6 rounded-xl shadow-md text-center">
                            <div class="flex justify-center mb-4">
                                <div class="flex items-center justify-center h-12 w-12 rounded-full bg-indigo-100 text-indigo-600">
                                    <i class="fas fa-3 text-xl"></i>
                                </div>
                            </div>
                            <h4 class="title font-medium text-gray-800 mb-2">启动容器</h4>
                            <p class="text-gray-600 text-sm">容器进程在独立的 namespaces 内运行，并且受到 cgroups 的资源限制和管理</p>
                        </div>
                    </div>
                    
                    <!-- Docker Example -->
                    <h3 class="title text-2xl font-semibold mb-6 text-gray-800 flex items-center justify-center">
                        <i class="fab fa-docker mr-3 text-indigo-600"></i> Docker 示例
                    </h3>
                    <div class="bg-white p-6 rounded-xl shadow-md max-w-2xl mx-auto">
                        <p class="text-gray-600 mb-4 text-center">使用 Docker 运行容器时，Docker 引擎会自动为容器配置适当的 namespaces 和 cgroups</p>
                        <div class="code-block px-4 py-3">
                            <code class="text-sm">docker run -it --name my_container ubuntu</code>
                        </div>
                        <p class="text-gray-600 mt-4 text-sm text-center">容器的网络、文件系统、进程和资源都会被隔离，以确保容器可以在同一台宿主机上安全地运行</p>
                    </div>
                </div>
            </div>
        </section>

        <!-- Summary Section -->
        <section class="mb-20">
            <div class="bg-gradient-to-r from-indigo-500 to-purple-600 rounded-2xl p-8 md:p-12 text-white">
                <div class="max-w-4xl mx-auto text-center">
                    <h2 class="title text-3xl font-bold mb-6">技术要点总结</h2>
                    <div class="grid md:grid-cols-2 gap-8 text-left">
                        <div>
                            <h3 class="title text-xl font-semibold mb-4 flex items-center justify-center md:justify-start">
                                <i class="fas fa-chart-pie mr-3"></i> cgroups
                            </h3>
                            <ul class="space-y-2">
                                <li class="flex items-start">
                                    <i class="fas fa-check-circle mt-1 mr-2"></i>
                                    <span>资源分配和限制的机制</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fas fa-check-circle mt-1 mr-2"></i>
                                    <span>管理CPU、内存、I/O等资源</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fas fa-check-circle mt-1 mr-2"></i>
                                    <span>确保系统稳定性，防止资源争用</span>
                                </li>
                            </ul>
                        </div>
                        <div>
                            <h3 class="title text-xl font-semibold mb-4 flex items-center justify-center md:justify-start">
                                <i class="fas fa-project-diagram mr-3"></i> namespaces
                            </h3>
                            <ul class="space-y-2">
                                <li class="flex items-start">
                                    <i class="fas fa-check-circle mt-1 mr-2"></i>
                                    <span>系统资源的隔离机制</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fas fa-check-circle mt-1 mr-2"></i>
                                    <span>提供进程、网络、文件系统等的隔离</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fas fa-check-circle mt-1 mr-2"></i>
                                    <span>创建独立的运行环境，实现容器化</span>
                                </li>
                            </ul>
                        </div>
                    </div>
                    <div class="mt-10">
                        <p class="text-lg opacity-90 leading-relaxed">
                            两者结合使用，<code class="bg-white bg-opacity-20 px-2 py-1 rounded">cgroups</code> 控制资源使用，<code class="bg-white bg-opacity-20 px-2 py-1 rounded">namespaces</code> 提供隔离环境，共同构成了现代容器技术的基础。
                        </p>
                    </div>
                </div>
            </div>
        </section>
    </div>

    <!-- Footer -->
    <footer class="bg-gray-900 text-white py-12 px-4 sm:px-6 lg:px-8">
        <div class="max-w-6xl mx-auto">
            <div class="flex flex-col items-center justify-center">
                <div class="mb-6">
                    <h3 class="title text-xl font-semibold">技术小馆</h3>
                </div>
                <div class="mb-6">
                    <a href="http://www.yuque.com/jtostring" class="footer-link hover:text-indigo-300 transition-colors">
                        <i class="fas fa-link mr-2"></i> http://www.yuque.com/jtostring
                    </a>
                </div>
                <div class="flex space-x-4">
                    <a href="#" class="footer-link hover:text-indigo-300 transition-colors">
                        <i class="fab fa-github text-lg"></i>
                    </a>
                    <a href="#" class="footer-link hover:text-indigo-300 transition-colors">
                        <i class="fab fa-twitter text-lg"></i>
                    </a>
                    <a href="#" class="footer-link hover:text-indigo-300 transition-colors">
                        <i class="fab fa-linkedin text-lg"></i>
                    </a>
                </div>
            </div>
        </div>
    </footer>

    <!-- Scripts -->
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            mermaid.initialize({
                startOnLoad: true,
                theme: 'default',
                flowchart: {
                    useMaxWidth: false,
                    htmlLabels: true,
                    curve: 'basis'
                }
            });
        });
    </script>
</body>
</html>
```